#ifndef INTERFACES_H
#define INTERFACES_H

#include <string>
#include "shareheader.h"

class PlotObserver
{
    public:
        virtual void update() = 0;
};

class PlotObservable
{
    public:
        virtual void registerObserver(PlotObserver *observer) = 0;
        virtual void removeObserver(PlotObserver *observer) = 0;
        virtual void notifyObservers() = 0;
};

class PlotControllerInterface
{
    public:
        virtual void addData(double x[], double y[]) = 0;
        virtual void addData(double x, double y, int curve) = 0;
        virtual void addCurve(std::string cur_name) = 0;
};

class ConfigControllerInterface
{
    public:
        virtual void setTranSetting(int tranType, const TTranSetting& setting) = 0;
        virtual void setGenConfig(int genId, const TGenConfig& config) = 0;
        virtual TTranSetting getTranSetting(int tranType) = 0;
        virtual TGenConfig getGenConfig(int genId) = 0;
        virtual void setDuration(int duration) = 0;
        virtual int getDuration() = 0;
        virtual void setIncUser(int user) = 0;
        virtual int getIncUser() = 0;
        virtual void setIncTime(int sec) = 0;
        virtual int getIncTime() = 0;
        virtual int addGen(std::string ip="", int userCount = 0) = 0;
        virtual void delGen(int genId) = 0;
};

#endif // INTERFACES_H
